/* @(#)GSOrderCancelViewListAction.java    V0.1
 *
 * Project: GSdevelop
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *   owen         2006-3-15
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
 *        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
 *        Haidian District, Beijing ,100081, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with HiTRUST.
 *
 * Warning:
 * =============================================================================
 * 
 */
package com.hitrust.gs.action;

import java.util.ArrayList;
import java.util.HashMap;

import system.LoginContext;

import com.hitrust.gs.bean.GSOperatorBean;
import com.hitrust.gs.business.GSOrderDeptInfoProcessor;
import com.hitrust.gs.business.GSOrderProcessor;
import com.hitrust.gs.business.GSUniteGwProcessor;
import com.hitrust.gs.dao.GSOrderDeptInfoDAO;
import com.hitrust.gs.form.GSOrderCancelListForm;
import com.hitrust.gs.lib.GSBaseConstants;
import com.hitrust.gs.service.GSBaseAction;
import com.hitrust.gs.service.GSBaseForm;
import com.hitrust.gs.util.page.ResultProcess;
import com.hitrust.gs.vo.GSOrderCancelVO;

/**
 * 取消订单的查询结果
 */
public class GSOrderCancelViewListAction extends GSBaseAction {

    
    public String execute(GSBaseForm aForm) throws Exception {
        GSOrderCancelListForm tForm = (GSOrderCancelListForm)aForm;
        GSOrderCancelVO tGSOrderCancelVO=new GSOrderCancelVO();
        tGSOrderCancelVO.orderid = tForm.orderId;
        tGSOrderCancelVO.orderDeptId = tForm.orderDeptId;
        tGSOrderCancelVO.manufInfo = tForm.manufInfo;
        tGSOrderCancelVO.concentricityId = tForm.concentricityId;
        tGSOrderCancelVO.orderCreateDateStr = tForm.orderCreateDateStr;
        tGSOrderCancelVO.orderCreateDateEnd = tForm.orderCreateDateEnd;
        tGSOrderCancelVO.orderDetailStatus = tForm.orderStatus;
        tGSOrderCancelVO.drawingpiececode = tForm.drawingpiececode;
        
        
        try{
            GSOrderProcessor tProc = new GSOrderProcessor();
            LoginContext context=(LoginContext) aForm.getSession().getAttribute(GSBaseConstants.LOGIN);
            GSUniteGwProcessor unitePro=new GSUniteGwProcessor();
            ArrayList wareList=unitePro.getWareHouseLevelName(context.getLoginWarehouseCode(), context.getLoginWarehouseCode());
            aForm.getRequest().setAttribute("orderdept",wareList);
            ArrayList tList = tProc.getCancelOrderAndDetail(tGSOrderCancelVO);
            ResultProcess tRsProc = new ResultProcess();
            tRsProc.setResult(tList);
            tForm.getRequest().setAttribute("order",tRsProc);
            aForm.getRequest().setAttribute("orderStatus",tForm.orderStatus);
       
            aForm.getRequest().setAttribute("requery","false");
        }
        catch(Exception e){
            tForm.getRequest().setAttribute("action","A100601.do");
            throw e;
        }
        return GSBaseConstants.FORWARD_SUCCESS;
    }

}
